package designpattern.factory.factorymethod;

public abstract class Pizza {
    private String name;

    public Pizza() {
        this.prepare();
        this.base();
        this.cut();
        this.box();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    //准备原材料
    public abstract void prepare();

    //烘烤
    public void base(){
        System.out.println("烘烤Pizza");
    }

    //切
    public void cut(){
        System.out.println("切Pizza");
    }

    //打包
    public void box(){
        System.out.println("打包Pizza");
    }
}
